from django.db import models

class Pc(models.Model):
    number = models.CharField(maxlength=36)
    lastactivity = models.DateField()

    class Admin:
        list_display = ("number","lastactivity")

    def __str__(self):
        return "%s, %s" % (self.number, self.lastactivity)

class Files(models.Model):
    name = models.CharField(maxlength=256)
    path = models.TextField()
    idpc = models.ForeignKey(Pc)
    flag = models.CharField(maxlength=7)
    date = models.CharField(maxlength=17)
    #size = models.CharField(maxlength=50)
    class Admin:
        list_display = ("name","path","idpc","flag","date")

    def __str__(self):
        #if self.screenshot:
        return "%s, %s, %s, %s, %s" % (self.name, self.path, self.idpc, self.flag, self.date)
        #else:
        #   return "%s, %s, %s" % (self.title, self.date, self.description)